package cn.tiga.basic.service.Impl;

import cn.tiga.basic.mapper.BaseMapper;
import cn.tiga.basic.query.BaseQuery;
import cn.tiga.basic.service.IBaseService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

public class BaseServiceImpl<T> implements IBaseService<T> {



    @Autowired
    private BaseMapper<T> baseMapper;
    @Override
    public List<T> loadAll() {
        return  baseMapper.loadAll();
    }

    @Override
    public T loadById(Long id) {
        return  baseMapper.loadById(id);
    }

    @Override
    public void remove(Long id) {

    }

    @Override
    public void save(T t) {
        baseMapper.save(t);
    }

    @Override
    public void update(T t) {
        baseMapper.update(t);

    }

    @Override
    public List<T> queryData(BaseQuery baseQuery) {
        return  baseMapper.queryData(baseQuery);
    }

    @Override
    public Integer queryCount(BaseQuery baseQuery) {
        return  baseMapper.queryCount(baseQuery);
    }

    @Override
    public void batchDel(List<Long> ids) {
        baseMapper.batchDel(ids);
    }
}
